import request from '@/utils/request'
const BASE = '/financial/orderCommission'

export function getOrderCommissionAddApi(data) {
    return request({
        url: `${BASE}/add`,
        method: "POST",
        data
    })
}


export function getOrderCommissionUserWithdrawalApi(params) {
    return request({
        url: `${BASE}/userWithdrawal`,
        method: "GET",
        params
    })
}

// 查询自己能提现的订单(商务和渠道)
export function getCommercialManagerWithdrawalApi(params) {
    return request({
        url: `${BASE}/commercialManagerWithdrawal`,
        method: "GET",
        params
    })
}

// 查询自己能提现的订单(实体运营总监\实体管理人员\实体拨比收款人)
export function getCommercialEntityWithdrawalApi(params) {
    return request({
        url: `${BASE}/entityWithdrawal`,
        method: "GET",
        params
    })
}

// 查询自己能提现的订单(专家)
export function getExpertWithdrawalApi(params) {
    return request({
        url: `${BASE}/expertWithdrawal`,
        method: "GET",
        params
    })
}

// 提现
export function getIOrderCommissionWithdrawApi(data) {
    return request({
        url: `${BASE}/withdraw`,
        method: "POST",
        data
    })
}

// 查询资金明细 /financial/orderCommission/incomeExpenditure
export function getOrderCommissionIncomeExpenditureApi(params){
    return request({
        url: `${BASE}/incomeExpenditure`,
        method: "get",
        params
    })
}

// 获取订单的分成详情 /financial/orderCommission/list
export function getOrderCommissionListApi(params){
    return request({
        url: `${BASE}/list`,
        method: "get",
        params
    })
}

// 申请提现 /financial/orderCommission/withdraw
export function getOrderCommissionWithdrawApi(data){
    return request({
        url: `${BASE}/withdraw`,
        method: "put",
        data
    })
}

// 查询可提现金额
export function getMobileUserBalanceApi() {
    return request({
        url: `${BASE}/mobileUserBalance`,
        method: "GET",
    })
  }